//
//  ZQComposeButton.swift
//  ZQWeibo
//
//  Created by summer的Dad on 16/11/21.
//  Copyright © 2016年 summer的Dad. All rights reserved.
//

import UIKit
var composeButtomWith : CGFloat = 80

var composeButtomHeight : CGFloat = 120
class ZQComposeButton: UIButton {

    override init(frame: CGRect) {
        super.init(frame: frame)
        
    self.titleLabel?.textAlignment = .center
        
    self.titleLabel?.font = UIFont.boldSystemFont(ofSize: 14)
    
    self.setTitleColor(UIColor.gray, for: .normal)
    
    }
    
    required init?(coder aDecoder: NSCoder) {
        fatalError("init(coder:) has not been implemented")
    }
    
    //title
    override func titleRect(forContentRect contentRect: CGRect) -> CGRect {
        
       return CGRect(x: 0, y:composeButtomWith , width: composeButtomWith, height: composeButtomHeight - composeButtomWith)
        
        
    }
    //image
    override func imageRect(forContentRect contentRect: CGRect) -> CGRect {
        
        return CGRect(x: 0, y: 0, width: composeButtomWith, height: composeButtomWith)
    }
    
    

}
